import _ from 'lodash';
import '../../styles/style.css';
import Icon from '../assets/img/house.jpg';
import data from '../../datas/data.xml'
// 加载css、图片、字体、数据等
function component() {
	let element = document.createElement('div');
	let span = document.createElement('span');

	// Lodash, now imported by this script
	element.innerHTML = _.join(['Hello', 'webpack'], ' ');
	element.classList.add('hello');
	span.className = 'icon iconfont icon-baolingqiu blue'
	span.innerHTML = '&#xe685;'
	
	// 将图像添加到我们现有的 div。
	var myIcon = new Image();
	myIcon.src = Icon;
	myIcon.style.width="300px"
	myIcon.style.height="auto"

	element.appendChild(span);
	element.appendChild(myIcon);
	
	
   	console.log('.xml文件', data)
	return element;
}

document.body.appendChild(component());